<template>
  <button @click="clickFn">Count++</button>
  <div>Count : {{state.count}}</div>
</template>

<script>
  import { onMounted, reactive } from 'vue';

  export default {
    name: "App",
    setup() {
      const state = reactive({
        count: 0
      });

      onMounted(() => {
        console.log('mounted');
      });

      function clickFn() {
        state.count++;
      }

      return {
        state,
        clickFn
      };
    }
  };
</script>

<style scoped>

</style>
